

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>试卷管理</title>
    <#include "/common/link.ftl">

</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl">
    <#assign currentMenu="exam"/>
    <#include "/common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>试卷编辑</h1>
        </section>
        <section class="content">
            <div class="box" style="padding: 10px">
                <form class="form-horizontal" action="/exam/preview" method="post" id="editForfhm" >

                    <input type="hidden">
                    <div class="form-group"  style="margin-top: 10px;">
                        <label  class="col-sm-2 control-label">试卷名称：</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" name="title" placeholder="请输入试卷名称">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">考试时长：</label>
                        <div class="col-sm-6">
                            <input type="number" class="form-control" name="examMinute"  placeholder="请输入考试时长">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">单选题：</label>

                        <div class="col-sm-3">
                            <input type="number" class="form-control"  name="singleNumber" placeholder="请输入随机组题数量">
                        </div>

                        <div class="col-sm-3">
                            <input type="number" class="form-control" name="singleScore"  placeholder="请输入每题分数">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">多选题：</label>

                        <div class="col-sm-3">
                            <input type="number" class="form-control" name="multiNumber"  placeholder="请输入随机组题数量">
                        </div>

                        <div class="col-sm-3">
                            <input type="number" class="form-control"  name="multiScore" placeholder="请输入每题分数">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">判断题：</label>

                        <div class="col-sm-3">
                            <input type="number" class="form-control" name="judgeNumber"  placeholder="请输入随机组题数量">
                        </div>

                        <div class="col-sm-3">
                            <input type="number" class="form-control" name="judgeScore"  placeholder="请输入每题分数">
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">试卷总分：</label>
                        <div class="col-sm-6">
                            <input type="number" class="form-control" name="totalScore"   placeholder="请输入试卷总分">
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-6 col-sm-6">
                            <button type="submit" class="btn btn-primary btn-submit">生成试卷</button>
                            <a href="javascript:window.history.back()" class="btn btn-danger">取消</a>
                        </div>
                    </div>

                </form>
            </div>
        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
<script>
    // $("#editForfhm").ajaxForm(function (data) {
    //     if (data){
    //         Swal.fire({
    //             title: '生成成功,查看试卷',
    //             icon: 'success',
    //             showCancelButton: true,
    //             confirmButtonText: '确认',
    //             cancelButtonText: '取消'
    //         }).then((result) => {
    //             // if (result.value) { //确认
    //             window.location.href = "/exam/preview?examId="+data.id;
    //             // }
    //         })
    //     }
    // })

    //
    // $(".btn-submit").click(function () {
    //     $.post("/exam/insert",)
    //     if (data.success) {
    //         Swal.fire({
    //             title: '登陆成功',
    //             icon: 'success',
    //             showCancelButton: true,
    //             confirmButtonText: '确认',
    //             cancelButtonText: '取消'
    //         }).then((result) => {
    //             // if (result.value) { //确认
    //             window.location.href = "/employee/list"
    //             // }
    //         })
    //     } else {
    //         Swal.fire(
    //             '登录失败',
    //             data.msg,
    //             'error'
    //         )
    //     }
    // })
</script>
</body>
</html>
